<template>
  <div id="app">
    <h2>测试题</h2>
    <subject><TodoHeader :list="list" :num="num"></TodoHeader></subject>
    <div>
      <flag><TodoMain></TodoMain></flag>
    </div>
  </div>
</template>

<script>
import TodoHeader from './components/TodoHeader.vue'
import TodoMain from './components/TodoMain.vue'
export default {
  components: {
    TodoHeader,
    TodoMain
  },
  data() {
    return {
      num: parseInt(Math.random() * 11),
      list: [
        { name: this.num, sum: this.num },
        { name: this.num, sum: this.num },
        { name: this.num, sum: this.num },
        { name: this.num, sum: this.num },
        { name: this.num, sum: this.num }
      ]
    }
  }
}
</script>

<style>
body {
  background-color: #eee;
}

#app {
  background-color: #fff;
  width: 500px;
  margin: 50px auto;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
  padding: 2em;
}
</style>
